
//
//  CommonNetWork.m
//  PostDelivery
//
//  Created by wmz on 2020/6/30.
//  Copyright © 2020 wmz. All rights reserved.
//

#import "CommonNetWork.h"

@implementation CommonNetWork
- (void)uploadImages:(NSArray <UIImage*>*)images
      viewController:(nullable UIViewController*)vc
            andBlock:(nullable PostNetWorkBock)block{
    return [self uploadImages:images names:nil viewController:vc info:@[@(ShowLoading),@(ShowSuccessAlert),@(ShowErrorAlert)] andBlock:block];
}
- (void)uploadImages:(NSArray <UIImage*>*)images
               names:(nullable NSArray <NSString*>*)names
      viewController:(nullable UIViewController*)vc
                info:(nullable NSArray*)infoArr
            andBlock:(nullable PostNetWorkBock)block{
    [[BSNetAPIClient sharedClient] requestImageWithPath:@"/qw/common/upload/img" params:@{} viewController:vc images:images names:names info:infoArr block:block];
}

- (void)uploadOneImage:(UIImage*)image
                  name:(nullable NSString*)name
        viewController:(nullable UIViewController*)vc
                  info:(nullable NSArray*)infoArr
              andBlock:(nullable PostNetWorkBock)block{
    [[BSNetAPIClient sharedClient] requestOneImageWithPath:@"/qw/common/upload/img" params:@{} viewController:vc image:image name:name info:infoArr block:block];
}

- (void)requestGetUserInfo:(NSDictionary *)params viewController:(nullable UIViewController*)vc andBlock:(nullable PostNetWorkBock)block{
    [[BSNetAPIClient sharedClient] requestWithPath:@"/qw/auth/getMemberBaseInfo" params:params viewController:vc type:Get info:@[]  block:block];
}

- (void)requestGetMemberInfo:(NSDictionary *)params viewController:(nullable UIViewController*)vc andBlock:(nullable PostNetWorkBock)block{
    [[BSNetAPIClient sharedClient] requestWithPath:@"/qw/app/member/baseInfo" params:params viewController:vc type:Get info:@[]  block:block];
}

- (void)requestGetIM:(NSDictionary *)params viewController:(nullable UIViewController*)vc andBlock:(nullable PostNetWorkBock)block{
    [[BSNetAPIClient sharedClient] requestWithPath:@"/qw/app/im/userSig" params:params viewController:vc type:Post info:@[]  block:block];
}

@end
